﻿@using Microsoft.AspNetCore.Http.Extensions
@using Microsoft.Extensions.Options
@using Volo.Abp.Users
@using System.Net
@using EventHub.Web
@using EventHub.Options
@inject ICurrentUser CurrentUser
@inject IOptions<EventHubUrlOptions> UrlOptions
@{
    var currentPageUrl = Context.Request.GetDisplayUrl();
    var platformVersion = EventHub.AssemblyInfoHelper.Get();
}

<footer class="mt-5">
    <div class="container">
        <div class="row">
            <div class="col-md">
                <a href="@Url.Page("/index")" class="footer-logo">
                    EventHub
                </a>
            </div>

            <div class="col-md">
                @if (!CurrentUser.IsAuthenticated)
                {
                    <h5>Account</h5>
                    <div class="footer-links">

                        <a href="@UrlOptions.Value.Account/account/register?returnUrl=@UrlOptions.Value.Www@(WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()))" class="d-block">Sign Up</a>
                        <a href="/account/login?returnUrl=@(WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()))" class="d-block">Log In</a>

                    </div>
                }
            </div>
            <div class="col-md">
                <h5>Follow Us</h5>
                <div class="footer-links">
                    <a target="_blank" href="https://www.facebook.com/openeventhub">
                        <i class="fab fa-facebook"></i>
                    </a>
                    <a target="_blank" href="https://twitter.com/openeventhub">
                        <i class="fab fa-x-twitter"></i>
                    </a>
                    <a target="_blank" href="https://www.instagram.com/openeventhub/">
                        <i class="fab fa-instagram"></i>
                    </a>
                    <a target="_blank" href="https://github.com/abpframework/eventhub">
                        <i class="fab fa-github"></i>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-bottom">
        <div class="container">
            <div class="row">
                <div class="col-md-auto">
                    <span class="copyright">© 2021 - @DateTime.Now.Year © <a>OpenEventHub</a></span>
                    <div>
                        <span class="copyright">Open source license with <a href="https://github.com/abpframework/eventhub/blob/main/LICENSE" target="_blank">LGPLv3.0</a></span>
                    </div>
                      <span style="font-size: 0.7rem;">
                          Made with ❤️ on <a href="https://github.com/abpframework/abp" target="_blank">ABP</a> @($"v{platformVersion.AbpCoreVersion}") <br/> Updated on @($"{platformVersion.ModificationDate.ToString("MMMM dd, yyyy, HH:mm")}")
                      </span>
                </div>
                <div class="col-md text-center text-md-end">
                    <a href="@UrlOptions.Value.Www/terms-service">
                        Terms of Service
                    </a>
                    <span>
                        <img src="/assets/seperator2.svg" class="mx-3">
                    </span>
                    <a href="@UrlOptions.Value.Www/privacy-policy">
                        Privacy Policy
                    </a>
                </div>
            </div>
        </div>
    </div>
</footer>